package cn.edu.gsau.info.controller;

import cn.edu.gsau.info.models.Code;
import cn.edu.gsau.info.models.ResponseResult;
import cn.edu.gsau.info.models.Status;
import cn.edu.gsau.info.service.IStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
* @BelongsProject: StatusController
* @BelongsPackage: cn.edu.gsau.info.controller
* @Author: kql
* @CreateTime: 2022/11/19
* @Description:
* @Version: 1.0
*/
@RestController
@RequestMapping("/status")
public class StatusController {
    @Autowired
    IStatusService statusService;
    /**
     * @Description 查询所有的状态值
     * @Param []
     * @return cn.edu.gsau.info.models.ResponseResult
     * @Date 2022/11/21 17:24
     * @Author kql
     **/
    @GetMapping("/findall")
    public ResponseResult findAll() {
        List<Status> list = statusService.list();
        return new ResponseResult(Code.GET_OK, "success", list);
    }
}
